package com.huitu.whht.ribbon_customer_feign.Service;

import com.huitu.whht.base.core.api.wr.wfz.entities.WrWfzBQo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;


@Service
@FeignClient(value = "base-szy-api")
public interface ISzyService {

    /**
     * 无参get请求
     * @return
     */
    @RequestMapping(value = "hbszy/wr/ab/b",method = RequestMethod.GET)
    Object getMethod();

    /**
     * 有参数的get请求方式
     * @param rbCd
     * @return
     */
    @RequestMapping(value = "hbszy/wr/ab/b/{rbCd}",method = RequestMethod.GET)
    Object getMethodWithParam(@RequestHeader("rbCd") String rbCd);


    /**
     * 无参post请求
     * @return
     */
    @RequestMapping(value = "hbszy/wr/ab/b/list",method = RequestMethod.POST)
    Object postMethod();

    /**
     * 有参post请求(java bean不能用建造者模式创建)
     * @return
     */
    @RequestMapping(value = "hbszy/wr/ab/b/list",method = RequestMethod.POST,consumes = "application/json")
    Map postMehodWithParam(@RequestBody Object object);

    /**
     * post传参采用javabean对象实体，返回map
     * @param wfzBQo
     * @return
     */
    @RequestMapping(value = "hbszy/wr/wfz/b/list",method = RequestMethod.POST,consumes = "application/json")
    Map postMehodWithParam2(@RequestBody WrWfzBQo wfzBQo);
}
